package demo1;

import org.springframework.stereotype.Component;

/**
 * 只有被@Component注解标柱的类才受Spring容器管理
 */
@Component
public class User {
    public void sayHello(){
        System.out.println("user:Hello!");
    }

}
